<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 7.3.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.ico">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha256-wiz7ZSCn/btzhjKDQBms9Hx4sSeUYsDrTLg7roPstac=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.css" integrity="sha256-6cQIC71/iBIYXFK+0RHAvwmjwWzkWd+r7v/BX3/vZDc=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/themes/green/pace-theme-minimal.css">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pace/1.2.4/pace.min.js" integrity="sha256-gqd7YTjg/BtfqWSwsJOvndl0Bxc8gFImLEkXQT8+qj0=" crossorigin="anonymous"></script>

<script class="next-config" data-name="main" type="application/json">{"hostname":"sumumm.github.io","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.19.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":true,"style":"mac"},"fold":{"enable":true,"height":300},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":true,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":true,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>

    <meta name="description" content="本文主要是天猫蓝牙Mesh项目——初级开发 管-蓝牙Mesh基础知识 的相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:type" content="article">
<meta property="og:title" content="LV04-天猫蓝牙Mesh项目-02-初级开发-04-管-蓝牙Mesh基础知识">
<meta property="og:url" content="https://sumumm.github.io/post/c222fb0c.html">
<meta property="og:site_name" content="苏木">
<meta property="og:description" content="本文主要是天猫蓝牙Mesh项目——初级开发 管-蓝牙Mesh基础知识 的相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5%E7%BD%91%E7%BB%9C%E6%A1%86%E6%9E%B6.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91%20-%20%E6%80%BB%E7%BA%BF%E5%9E%8B.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91%20-%20%E6%98%9F%E5%9E%8B.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91%20-%20%E7%8E%AF%E5%BD%A2.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91%20-%20%E6%A0%91%E5%9E%8B.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91%20-%20%E7%BD%91%E7%8A%B6.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99%E9%80%9A%E4%BF%A1%E6%A8%A1%E5%BC%8F.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/BLE%E8%93%9D%E7%89%99%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99Mesh%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%20-%20%E6%A0%88.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99%20Mesh%20%E5%8D%8F%E8%AE%AE%E6%A0%88%E8%B0%83%E7%94%A8%E9%A1%BA%E5%BA%8F.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99Mesh.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99Mesh%E8%A7%92%E8%89%B2.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20231230145458225.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E5%85%83%E7%B4%A0%E3%80%81%E6%A8%A1%E5%9E%8B%E5%92%8C%E5%8D%95%E6%92%AD%E5%9C%B0%E5%9D%80.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E6%B6%88%E6%81%AF%E3%80%81%E7%8A%B6%E6%80%81%E4%B8%8E%E8%AE%BE%E5%A4%87.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E4%B8%89%E7%B1%BB%E6%A8%A1%E5%9E%8B.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E5%BA%94%E7%94%A8%E5%AF%86%E9%92%A5%E7%BB%91%E5%AE%9A%E5%AE%9E%E4%BE%8B.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99%20Mesh%20%E5%9F%BA%E7%A1%80%E6%A8%A1%E5%9E%8B.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99%20Mesh%20%E9%85%8D%E7%BD%AE%E6%A8%A1%E5%9E%8B%E7%8A%B6%E6%80%81.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99%20Mesh%20%E5%81%A5%E5%BA%B7%E6%A8%A1%E5%9E%8B%E7%8A%B6%E6%80%81.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E6%A8%A1%E5%9E%8BID.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E6%A8%A1%E5%9E%8B%E6%93%8D%E4%BD%9C%E7%A0%81opcode.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99Mesh%E5%8E%82%E5%95%86%E6%A8%A1%E5%9E%8B%20-%20%E5%8E%82%E5%95%86%E6%A8%A1%E5%9E%8BID.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99Mesh%E5%8E%82%E5%95%86%E6%A8%A1%E5%9E%8B%20-%20%E6%B6%88%E6%81%AF%E7%BB%93%E6%9E%84%EF%BC%88%E8%AF%BB%E5%8F%96%EF%BC%89.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E8%93%9D%E7%89%99Mesh%E5%8E%82%E5%95%86%E6%A8%A1%E5%9E%8B%20-%20%E6%B6%88%E6%81%AF%E7%BB%93%E6%9E%84%EF%BC%88%E8%AE%BE%E7%BD%AE%EF%BC%89.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E9%A3%8E%E6%89%87%E4%BA%A7%E5%93%81%E8%BD%AF%E4%BB%B6%E8%A7%84%E8%8C%83.png">
<meta property="og:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5%E5%8E%82%E5%95%86%E6%93%8D%E4%BD%9C%E7%A0%81.png">
<meta property="article:published_time" content="2024-01-07T03:45:54.000Z">
<meta property="article:modified_time" content="2025-06-13T16:25:57.028Z">
<meta property="article:author" content="苏木">
<meta property="article:tag" content="LV21-天猫精灵IOT">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5%E7%BD%91%E7%BB%9C%E6%A1%86%E6%9E%B6.png">


<link rel="canonical" href="https://sumumm.github.io/post/c222fb0c.html">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://sumumm.github.io/post/c222fb0c.html","path":"post/c222fb0c.html","title":"LV04-天猫蓝牙Mesh项目-02-初级开发-04-管-蓝牙Mesh基础知识"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>LV04-天猫蓝牙Mesh项目-02-初级开发-04-管-蓝牙Mesh基础知识 | 苏木</title>
  








    <script src="/js/browser_tools_disable.js"></script>

  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
<!-- hexo injector head_end start --><link rel="stylesheet" href="https://unpkg.com/hexo-next-tags-plus@latest/lib/tag_plus.css" media="defer" onload="this.media='all'"><!-- hexo injector head_end end --></head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">苏木</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">我的学习之路</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>苏木的家</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类页<span class="badge">42</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档页<span class="badge">673</span></a></li><li class="menu-item menu-item-flink"><a href="/flink/" rel="section"><i class="fa fa-link fa-fw"></i>友人帐</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于我</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E8%93%9D%E7%89%99Mesh%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91"><span class="nav-text">一、蓝牙Mesh网络拓扑</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E6%97%A0%E7%BA%BF%E7%BD%91%E7%BB%9C%E5%88%86%E7%B1%BB"><span class="nav-text">1. 无线网络分类</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E5%B8%B8%E8%A7%81%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91"><span class="nav-text">2. 常见网络拓扑</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#2-1-%E6%80%BB%E7%BA%BF%E5%9E%8B"><span class="nav-text">2.1 总线型</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-2-%E6%98%9F%E5%9E%8B"><span class="nav-text">2.2 星型</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-3-%E7%8E%AF%E5%BD%A2"><span class="nav-text">2.3 环形</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-4-%E6%A0%91%E5%9E%8B"><span class="nav-text">2.4 树型</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-5-%E7%BD%91%E7%8A%B6"><span class="nav-text">2.5 网状</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-6-%E6%B7%B7%E5%90%88%E7%BD%91%E7%BB%9C%E5%9E%8B%E6%8B%93%E6%89%91%E7%BB%93%E6%9E%84"><span class="nav-text">2.6 混合网络型拓扑结构</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-%E8%93%9D%E7%89%99%E7%BD%91%E7%BB%9C%E6%8B%93%E6%89%91"><span class="nav-text">3. 蓝牙网络拓扑</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1-%E8%93%9D%E7%89%99%E4%B8%AA%E5%9F%9F%E7%BD%91"><span class="nav-text">3.1 蓝牙个域网</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2-%E8%93%9D%E7%89%99Mesh%E7%BD%91%E7%8A%B6%E6%8B%93%E6%89%91"><span class="nav-text">3.2 蓝牙Mesh网状拓扑</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-3-%E9%98%B2%E6%AD%A2%E5%B9%BF%E6%92%AD%E6%B4%AA%E6%B3%9B"><span class="nav-text">3.3 防止广播洪泛</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E8%93%9D%E7%89%99Mesh%E5%8D%8F%E8%AE%AE%E6%A0%88%E7%BB%93%E6%9E%84"><span class="nav-text">二、蓝牙Mesh协议栈结构</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E4%BB%80%E4%B9%88%E6%98%AF%E5%8D%8F%E8%AE%AE%E6%A0%88%EF%BC%9F"><span class="nav-text">1. 什么是协议栈？</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E8%93%9D%E7%89%99Mesh%E5%8D%8F%E8%AE%AE%E6%A0%88%E5%90%84%E5%B1%82%E8%A1%8C%E4%B8%BA"><span class="nav-text">2. 蓝牙Mesh协议栈各层行为</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E6%9C%AC%E6%A6%82%E5%BF%B5"><span class="nav-text">三、蓝牙Mesh基本概念</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-Mesh%E4%B8%AD%E7%9A%84%E8%A7%92%E8%89%B2"><span class="nav-text">1. Mesh中的角色</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E5%9C%B0%E5%9D%80%E7%9A%84%E7%B1%BB%E5%9E%8B"><span class="nav-text">2. 地址的类型</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-%E5%85%83%E7%B4%A0%E3%80%81%E6%A8%A1%E5%9E%8B%E4%B8%8E%E5%8D%95%E6%92%AD%E5%9C%B0%E5%9D%80"><span class="nav-text">3. 元素、模型与单播地址</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-%E6%B6%88%E6%81%AF%E3%80%81%E7%8A%B6%E6%80%81%E3%80%81%E6%A8%A1%E5%9E%8B"><span class="nav-text">4. 消息、状态、模型</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#5-%E5%8F%91%E5%B8%83%E5%92%8C%E8%AE%A2%E9%98%85"><span class="nav-text">5. 发布和订阅</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#6-Mesh%E7%BD%91%E7%BB%9C%E5%AE%89%E5%85%A8"><span class="nav-text">6. Mesh网络安全</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E8%93%9D%E7%89%99Mesh%E6%A8%A1%E5%9E%8B%E5%B1%82%E4%BB%8B%E7%BB%8D"><span class="nav-text">四、蓝牙Mesh模型层介绍</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E9%85%8D%E7%BD%AE%E6%A8%A1%E5%9E%8B"><span class="nav-text">1. 配置模型</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E9%80%9A%E7%94%A8%E6%A8%A1%E5%9E%8B"><span class="nav-text">2. 通用模型</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#2-1-SIG-model-ID"><span class="nav-text">2.1 SIG model ID</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-2-SIG-Model-%E6%93%8D%E4%BD%9C%E7%A0%81"><span class="nav-text">2.2 SIG Model 操作码</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-%E5%8E%82%E5%95%86%E6%A8%A1%E5%9E%8B"><span class="nav-text">3. 厂商模型</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1-%E6%B6%88%E6%81%AF%E7%BB%93%E6%9E%84%EF%BC%88%E8%AF%BB%E5%8F%96%EF%BC%89"><span class="nav-text">3.1 消息结构（读取）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2-%E6%B6%88%E6%81%AF%E7%BB%93%E6%9E%84%EF%BC%88%E8%AE%BE%E7%BD%AE%EF%BC%89"><span class="nav-text">3.2 消息结构（设置）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-3-%E5%B1%9E%E6%80%A7%E7%B1%BB%E5%9E%8B%E8%A7%84%E8%8C%83"><span class="nav-text">3.3 属性类型规范</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-4-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5%E5%8E%82%E5%95%86%E6%93%8D%E4%BD%9C%E7%A0%81"><span class="nav-text">3.4 天猫精灵厂商操作码</span></a></li></ol></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="苏木"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">苏木</p>
  <div class="site-description" itemprop="description">莫道桑榆晚，为霞尚满天</div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">673</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">42</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">43</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>
  <div class="links-of-author animated">
      <span class="links-of-author-item">
        <a href="https://github.com/sumumm" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;sumumm" rel="noopener me" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
  </div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://sumumm.github.io/post/c222fb0c.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="苏木">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="苏木">
      <meta itemprop="description" content="莫道桑榆晚，为霞尚满天">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="LV04-天猫蓝牙Mesh项目-02-初级开发-04-管-蓝牙Mesh基础知识 | 苏木">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          LV04-天猫蓝牙Mesh项目-02-初级开发-04-管-蓝牙Mesh基础知识
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2024-01-07 11:45:54" itemprop="dateCreated datePublished" datetime="2024-01-07T11:45:54+08:00">2024-01-07</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/" itemprop="url" rel="index"><span itemprop="name">嵌入式开发</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/" itemprop="url" rel="index"><span itemprop="name">01HQ课程体系</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/" itemprop="url" rel="index"><span itemprop="name">LV21-天猫精灵IOT</span></a>
        </span>
    </span>

  
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>9.2k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>33 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody"><p>本文主要是天猫蓝牙Mesh项目——初级开发 管-蓝牙Mesh基础知识 的相关笔记，若笔记中有错误或者不合适的地方，欢迎批评指正😃。</p>
<span id="more"></span>

<!-- Photo: https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/ -->

<details class="folding-tag" blue><summary> 点击查看使用工具及版本 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center" width=150px>Windows版本</td>        <td align="left">windows11</td>    </tr>    <tr>        <td align="center">Ubuntu版本</td>        <td align="left">Ubuntu22.04的64位版本</td>      </tr>    <tr>        <td align="center">VMware® Workstation 16 Pro</td>        <td align="left">16.2.3 build-19376536</td>      </tr>    <tr>        <td align="center">终端软件</td>        <td align="left">MobaXterm(Professional Edition v23.0 Build 5042 (license))</td>      </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看本文参考资料 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center">分类</td>        <td align="center">网址</td>        <td align="center">说明</td>    </tr>    <tr>        <td align="center" rowspan="6">官方网站</td>        <td align="left"><a href="https://cn.aliyun.com/" target="_blank">阿里云</a></td>        <td align="left">阿里云官网主页</td>    </tr>    <tr>        <td align="left"><a href="https://www.aliyun.com/product/iot/livinglink?spm=5176.28508143.J_4VYgf18xNlTAyFFbOuOQe.317.5421154acZniIL&scm=20140722.X_data-1da961ea118f5bb0e4b2._.V_1" target="_blank">阿里生活物联平台</a></td>        <td align="left">生活物联网平台(飞燕平台)主页</td>    </tr>    <tr>        <td align="left"><a href="https://iap.aligenie.com/?spm=0.7629140.0.0.2c611780Ty6tzg" target="_blank">AliGenie</a></td>        <td align="left">天猫精灵开放平台AliGenie主页</td>    </tr>    <tr>        <td align="left"><a href="https://www.aliyun.com/product/iot/iot_instc_public_cn?spm=5176.28508143.J_4VYgf18xNlTAyFFbOuOQe.81.5421154au3ocqp&scm=20140722.X_data-9349178ba84cf028806a._.V_1" target="_blank">阿里物联网平台</a></td>        <td align="left">阿里物联网平台主页</td>    </tr>    <tr>        <td align="left"><a href="https://www.bluetooth.com/zh-cn/" target="_blank">Bluetooth 技术网站</a></td>        <td align="left">蓝牙协议规范什么的可以来这里找</td>    </tr>    <tr>        <td align="left"><a href="https://www.telink-semi.com/" target="_blank">Telink</a></td>        <td align="left">Telink | Chips for a Smarter IoT (telink-semi.com)<br><a href="https://www.telink-semi.cn/" target="_blank">Telink中文官网</a></td>    </tr>    <tr>        <td align="center" rowspan="5">开发手册</td>        <td align="left"><a href="https://help.aliyun.com/zh/alios-things/" target="_blank">AliOS Things开发指南</a></td>        <td align="left">AliOS Things开发指南，这里是最新版本，可以直接从官网找到</td>    </tr>     <tr>        <td align="left"><a href="https://haas.iot.aliyun.com/aliosthings/index.html" target="_blank">AliOS Things开发指南</a></td>        <td align="left">AliOS Things应用开发指南，这里应该是3.3版本的完整开发文档</td>    </tr>    <tr>        <td align="left"><a href="https://gaic.alicdn.com/aic/h5_daily/test/aliosthings/3.0.13/index.html" target="_blank">AliOS Things开发指南(3.0)</a></td>        <td align="left">AliOS Things应用开发指南，这里应该是3.0版本的完整开发文档</td>    </tr>    <tr>        <td align="left"><a href="https://help.aliyun.com/product/123207.html?spm=a2c4g.11186623.6.540.114e60d84sF58G" target="_blank">生活物联网平台开发文档</a></td>        <td align="left">生活物联网平台（飞燕平台）开发文档<br><a href="https://help.aliyun.com/document_detail/180778.html?spm=a2c4g.123207.0.0.49556adcO5apvd" target="_blank">《设备端开发指南》</a></td>    </tr>    <tr>        <td align="left"><a href="https://doc-bot.tmall.com/docs/doc.htm?spm=0.7629140.0.0.7bf81780UN7WkQ&treeId=578&articleId=118057&docType=1" target="_blank">Wi-Fi IoT品类定义与功能开发</a></td>        <td align="left">天猫精灵IoT开放平台——Wi-Fi IoT品类定义与功能开发</td>    </tr>    <tr>        <td align="center" rowspan="3">硬件平台</td>        <td align="left"><a href="https://developer.aliyun.com/article/761644?spm=a2c6h.12873581.0.dArticle761644.1c1b589dRHgvcR&groupCode=genieaiot" target="_blank">mk3080 WiFi开发板</a></td>        <td align="left">WiFi开发板使用指南-阿里云开发者社区</td>    </tr>    <tr>        <td align="left"><a href="http://www.taichi-maker.com/homepage/esp8266-nodemcu-iot/esp8266-nodemcu-tutorial-index/" target="_blank">esp8266开发板</a></td>        <td align="left">一个教程：ESP8266-NodeMCU开发板详解-太极创客 (taichi-maker.com)</td>    </tr>    <tr>        <td align="left"><a href="https://wiki.telink-semi.cn/doc/ds/DS_TLSR8258-E_Datasheet%20for%20Telink%20BLE+IEEE802.15.4%20Multi-Standard%20Wireless%20SoC%20TLSR8258.pdf" target="_blank">TLSR8258 Datasheet</a></td>        <td align="left">Datasheet for Telink BLE + IEEE802.15.4 MultiStandard Wireless SoC TLSR8258</td>    </tr>    <tr>        <td align="center" rowspan="2">参考资料</td>        <td align="left"><a href="https://developer.aliyun.com/article/720516#" target="_blank">AliOS Things 3.0 应用开发指南</a></td>        <td align="left">这个只是一篇参考文章，里面是一些环境搭建相关的，可以参考</td>    </tr>    <tr>        <td align="left"><a href="https://info.support.huawei.com/info-finder/encyclopedia/zh/index.html" target="_blank">IP知识百科 - 华为 (huawei.com)</a></td>        <td align="left">IP的一些相关知识点</td>    </tr></table>
              </div>
            </details>

<details class="folding-tag" blue><summary> 点击查看相关文件下载 </summary>
              <div class='content'>
              <table>    <tr>        <td align="center" width=150px>分类</td>        <td align="center">网址</td>        <td align="center">说明</td>    </tr>    <tr>        <td align="left" rowspan="6">蓝牙规范相关文档</td>        <td align="left"><a href="https://www.bluetooth.com/zh-cn/specifications/specs/core-specification-5-2/" target="_blank">Core Specification 5.2</a></td>        <td align="left">核心规格 5.2，该规范定义了创建可互操作的Bluetooth 设备所需的技术。                        <br><a href="./蓝牙参考资料/Core_v5.2.pdf" target="_blank">《Core_v5.2.pdf》</a></td>      </tr>    <tr>        <td align="left"><a href="https://www.bluetooth.com/zh-cn/specifications/specs/mesh-model-1-1/" target="_blank">Mesh Model(v1.1)</a></td>        <td align="left">本Bluetooth 规范定义了模型（以及它们所需的状态和消息），这些模型用于在mesh 网络中的节点上执行基本功能，超出了Bluetooth Mesh 配置文件 规范中定义的基础模型。                        <br>本规范包括定义跨设备类型标准功能的通用模型，以及支持关键mesh 场景的模型，如照明控制、传感器、时间和场景。                        <br><a href="./蓝牙参考资料/MshMDL_v1.1.pdf" target="_blank">《MshMDL_v1.1.pdf》</a></td>      </tr>    <tr>        <td align="left"><a href="https://www.bluetooth.com/zh-cn/specifications/specs/mesh-profile-1-0-1/" target="_blank">Mesh Profile(v1.0.1)</a></td>        <td align="left">该Bluetooth 规范定义了基本要求，以实现可互操作的mesh 网络解决方案，用于Bluetooth 低能量无线技术。                        <br><a href="./蓝牙参考资料/MshPRFv1.0.1.pdf" target="_blank">《MshPRFv1.0.1.pdf》</a></td>      </tr>    <tr>        <td align="left"><a href="https://www.bluetooth.com/zh-cn/specifications/device-properties/" target="_blank">Mesh Device Properties</a></td>        <td align="left">本规范包含Bluetooth Mesh 配置文件 和Bluetooth Mesh 模型规范所要求的设备属性的定义。                        <br>但是跟之前的有些区别，我主要看的之前的版本：<a href="./蓝牙参考资料/MeshDeviceProperties_v1.2.pdf" target="_blank">《MMeshDeviceProperties_v1.2.pdf》</a></td>      </tr>    <tr>        <td align="left"><a href="https://www.bluetooth.com/specifications/gss/" target="_blank">GATT Specification Supplement</a></td>        <td align="left">GATT Specification Supplement | Bluetooth® Technology Website。                        <br>好像可以在线看：<a href="https://btprodspecificationrefs.blob.core.windows.net/gatt-specification-supplement/GATT_Specification_Supplement.pdf" target="_blank">《GATT Specification Supplement》</a></td>      </tr>     <tr>        <td align="left"><a href="https://www.bluetooth.com/specifications/assigned-numbers/" target="_blank">Assigned Numbers</a></td>        <td align="left">GATT的一些类型定义可以在这里找。</td>      </tr>    <tr>        <td align="left" rowspan="2">AliOS Things</td>        <td align="left"><a href="https://gitee.com/alios-things-admin/AliOS-Things" target="_blank">alios-things/AliOS-Things</a></td>        <td align="left">Gitee上的AliOSThings SDK源码仓库</td>      </tr>    <tr>        <td align="left"><a href="https://github.com/alibaba/AliOS-Things" target="_blank">alibaba/AliOS-Things</a></td>        <td align="left">GitHub上的AliOSThings SDK源码仓库</td>      </tr>    <tr>        <td align="left" rowspan="2">天猫精灵蓝牙Mesh协议栈</td>        <td align="left"><a href="https://github.com/alibaba-archive/genie-bt-mesh-stack" target="_blank">alibaba-archive/genie-bt-mesh-stack</a></td>        <td align="left">GitHub上的天猫精灵蓝牙Mesh协议栈源码仓库。<br>之前是在<a href="https://github.com/alibaba/genie-bt-mesh-stack"target="_blank">alibaba/genie-bt-mesh-stack</a>这个仓库。<br>写笔记的时候最新提交为<a href="https://github.com/alibaba-archive/genie-bt-mesh-stack/tree/faf523618a6a2560090fc423222b9db80984bb7a" target="_blank">faf523618a6a2560090fc423222b9db80984bb7a</a></td>      </tr>    <tr>        <td align="left"><a href="https://help.aliyun.com/document_detail/171552.html?spm=a2c4g.173310.0.0.55d6e992e8xJip" target="_blank">蓝牙Mesh设备开发指南</a></td>        <td align="left">阿里云生活服务平台开发手册——蓝牙设备开发一节中的内容</td>      </tr></table>
              </div>
            </details>

<p>这一LV的笔记起始跟前面有所重叠，互相补充吧算是。天猫精灵语音控制生态架构如下，其实前面已经了解过了：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/天猫精灵网络框架.png" alt="天猫精灵网络框架" style="zoom:15%;" />

<h1 id="一、蓝牙Mesh网络拓扑"><a href="#一、蓝牙Mesh网络拓扑" class="headerlink" title="一、蓝牙Mesh网络拓扑"></a><font size=3>一、蓝牙Mesh网络拓扑</font></h1><h2 id="1-无线网络分类"><a href="#1-无线网络分类" class="headerlink" title="1. 无线网络分类"></a><font size=3>1. 无线网络分类</font></h2><p>无线个域网（微微网）、无线局域网、无线城域网、无线广域网等。</p>
<h2 id="2-常见网络拓扑"><a href="#2-常见网络拓扑" class="headerlink" title="2. 常见网络拓扑"></a><font size=3>2. 常见网络拓扑</font></h2><h3 id="2-1-总线型"><a href="#2-1-总线型" class="headerlink" title="2.1 总线型"></a><font size=3>2.1 总线型</font></h3><p>总线型结构是将网络中的所有设备通过相应的硬件接口直接连接到公共总线上，结点之间按广播方式通信，一个结点发出的信息，总线上的其它结点均可“收听”到。  总线型结构就像一张树叶,有一条主干线,主干线上面由很多分支。总线型拓扑结构图如下:</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/网络拓扑 - 总线型.png" alt="网络拓扑 - 总线型" style="zoom:15%;" />

<p><strong>总线型拓扑结构的网络特点如下</strong>：</p>
<ul>
<li>结构简单，可扩充性好；</li>
<li>当需要增加节点时，只需要在总线上增加一个分支接口便可与分支节点相连，当总线负载不允许时还可以扩充总线；</li>
<li>使用的电缆少，且安装容易；</li>
<li>使用的设备相对简单，可靠性高；</li>
<li>维护难，分支节点故障查找难。</li>
</ul>
<p><strong>总线型拓扑结构的结构特点如下</strong>：</p>
<ul>
<li>组网费用低：从示意图可以这样的结构根本不需要另外的互联设备，是直接通过一条总线进行连接，所以组网费用较低；</li>
<li>这种网络因为各节点是共用总线带宽的，所以在传输速度上会随着接入网络的用户的增多而下降；</li>
<li>网络用户扩展较灵活：需要扩展用户时只需要添加一个接线器即可，但所能连接的用户数量有限；</li>
<li>维护较容易：单个节点失效不影响整个网络的正常通信。但是如果总线一断，则整个网络或者相应主干网段就断了。</li>
<li>这种网络拓扑结构的缺点是一次仅能一个端用户发送数据，其它端用户必须等待到获得发送权。</li>
</ul>
<h3 id="2-2-星型"><a href="#2-2-星型" class="headerlink" title="2.2 星型"></a><font size=3>2.2 星型</font></h3><p>星型结构是一种以中央节点为中心，把若干外围节点连接起来的辐射式互联结构。这种结构适用于局域网，特别是近年来连接的局域网大都采用这种连接方式。这种连接方式以双绞线或同轴电缆作连接线路。星型拓扑结构图如下:</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/网络拓扑 - 星型.png" alt="网络拓扑 - 星型" style="zoom:15%;" />

<p><strong>星型拓扑结构的结构特点如下</strong>：</p>
<ul>
<li>控制简单。任何一站点只和中央节点相连接，因而介质访问控制方法简单，致使访问协议也十分简单。易于网络监控和管理。</li>
<li>故障诊断和隔离容易。中央节点对连接线路可以逐一隔离进行故障检测和定位，单个连接点的故障只影响一个设备，不会影响全网。</li>
<li>方便服务。中央节点可以方便地对各个站点提供服务和网络重新配置。</li>
</ul>
<p>总的来说星型拓扑结构相对简单，便于管理，建网容易，是目前局域网普采用的一种拓扑结构。采用星型拓扑结构的局域网，一般使用双绞线或光纤作为传输介质，符合综合布线标准，能够满足多种宽带需求。</p>
<p>尽管物理星型拓扑的实施费用高于物理总线拓扑，然而星型拓扑的优势却使其物超所值。每台设备通过各自的线缆连接到中心设备，因此某根电缆出现问题时只会影响到那一台设备，而网络的其他组件依然可正常运行。这个优点极其重要，这也正是所有新设计的以太网都采用的物理星型拓扑的原因所在。</p>
<h3 id="2-3-环形"><a href="#2-3-环形" class="headerlink" title="2.3 环形"></a><font size=3>2.3 环形</font></h3><p>环形结构各结点通过通信线路组成闭合回路，环中数据只能单向传输，信息在每台设备上的延时时间是固定的，特别适合实时控制的局域网系统。环形结构就如一串珍珠项链,环形结构上的每台计算机就是项链上的一个个珠子。环形拓扑结构图如下:</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/网络拓扑 - 环形.png" alt="网络拓扑 - 环形" style="zoom:25%;" />

<p>实际上大多数情况下这种拓扑结构的网络不会是所有计算机真的要连接成物理上的环型，一般情况下，环的两端是通过一个阻抗匹配器来实现环的封闭的，因为在实际组网过程中因地理位置的限制不方便真的做到环的两端物理连接。</p>
<p><strong>环型拓扑结构的网络特点如下</strong>：</p>
<ul>
<li>信息流在网中是沿着固定方向流动的，两个节点仅有一条道路，故简化了路径选择的控制；</li>
<li>环路上各节点都是自举控制，故控制软件简单；</li>
<li>由于信息源在环路中是串行地穿过各个节点，当环中节点过多时，势必影响信息传输速率，使网络的响应时间延长；</li>
<li>环路是封闭的，不便于扩充；</li>
<li>可靠性低，一个节点故障，将会造成全网瘫痪；</li>
<li>维护难，对分支节点故障定位较难。</li>
</ul>
<p><strong>环型拓扑结构的结构特点如下</strong>：</p>
<ul>
<li>一般仅适用于IEEE 802.5的令牌网(Token ring network)，在这种网络中，”令牌”是在环型连接中依次传递。所用的传输介质一般是同轴电缆。</li>
<li>网络实现也非常简单，投资最小。可以从其网络结构示意图中看出，组成这个网络除了各工作站就是传输介质–同轴电缆，以及一些连接器材，没有价格昂贵的节点集中设备，如集线器和交换机。但也正因为这样，所以这种网络所能实现的功能最为简单，仅能当作一般的文件服务模式；</li>
<li>传输速度较快：在令牌网中允许有16Mbps的传输速度，它比普通的10Mbps以太网要快许多。当然随着以太网的广泛应用和以太网技术的发展，以太网的速度也得到了极大提高，目前普遍都能提供100Mbps的网速，远比16Mbps要高。</li>
<li>维护困难：从其网络结构可以看到，整个网络各节点间是直接串联，这样任何一个节点出了故障都会造成整个网络的中断、瘫痪，维护起来非常不便。另一方面因为同轴电缆所采用的是插针式的接触方式，所以非常容易造成接触不良，网络中断，而且这样查找起来非常困难，这一点相信维护过这种网络的人都会深有体会。</li>
<li>扩展性能差：也是因为它的环型结构，决定了它的扩展性能远不如星型结构的好，如果要新添加或移动节点，就必须中断整个网络，在环的两端作好连接器才能连接。</li>
</ul>
<h3 id="2-4-树型"><a href="#2-4-树型" class="headerlink" title="2.4 树型"></a><font size=3>2.4 树型</font></h3><p>树型拓扑结构是一种层次结构，结点按层次连结，信息交换主要在上下结点之间进行，相邻结点或同层结点之间一般不进行数据交换。树型拓扑结构是就是数据结构中的树。树型拓扑结构图如下:</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/网络拓扑 - 树型.png" alt="网络拓扑 - 树型" style="zoom:10%;" />

<p><strong>树形拓扑结构的网络特点如下：</strong></p>
<ul>
<li>网络结构简单，便于管理；</li>
<li>控制简单，建网容易；</li>
<li>网络延迟时间较短，误码率较低；</li>
<li>网络共享能力较差；</li>
<li>通信线路利用率不高；</li>
<li>中央结点负荷太重。</li>
</ul>
<p><strong>树型拓扑结构的结构特点如下</strong>：</p>
<ul>
<li>易于扩充。树形结构可以延伸出很多分支和子分支，这些新节点和新分支都能容易地加入网内。</li>
<li>故障隔离较容易。如果某一分支的节点或线路发生故障，很容易将故障分支与整个系统隔离开来。</li>
<li>各个节点对根节点的依赖性太大。如果根发生故障，则全网不能正常工作。</li>
</ul>
<h3 id="2-5-网状"><a href="#2-5-网状" class="headerlink" title="2.5 网状"></a><font size=3>2.5 网状</font></h3><p>网络拓扑结构又称作无规则结构，结点之间的联结是任意的，没有规律。网状拓扑结构图如下:</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/网络拓扑 - 网状.png" alt="网络拓扑 - 网状" style="zoom:15%;" />

<p><strong>网状网络拓扑结构的结构特点如下：</strong></p>
<ul>
<li>网络可靠性高，一般通信子网中任意两个节点交换机之间，存在着两条或两条以上的通信路径，这样，当一条路径发生故障时，还可以通过另一条路径把信息送至节点交换机。</li>
<li>网络可组建成各种形状，采用多种通信信道，多种传输速率。</li>
<li>网内节点共享资源容易。</li>
<li>可改善线路的信息流量分配。</li>
<li>可选择最佳路径，传输延迟小。</li>
</ul>
<p>网状形网是广域网中最常采用的一种网络形式，是典型的点到点结构。在网状拓扑结构中，网络的每台设备之间均有点到点的链路连接，这种连接不经济，只有每个站点都要频繁发送信息时才使用这种方法。它的安装也复杂，但系统可靠性高，容错能力强。有时也称为分布式结构。</p>
<h3 id="2-6-混合网络型拓扑结构"><a href="#2-6-混合网络型拓扑结构" class="headerlink" title="2.6 混合网络型拓扑结构"></a><font size=3>2.6 混合网络型拓扑结构</font></h3><p>混合型网络拓扑结构就是指同时使用上面的5种网络拓扑结构种两种或两种以上的网络拓扑结构。</p>
<p>这种网络拓扑结构是由星型结构和总线型结构的网络结合在一起的网络结构，这样的拓扑结构更能满足较大网络的拓展，解决星型网络在传输距离上的局限，而同时又解决了总线型网络在连接用户数量的限制。这种网络拓扑结构同时兼顾了星型网与总线型网络的优点，在缺点方面得到了一定的弥补。</p>
<p><strong>混合型网络拓扑结构的结构特点如下：</strong></p>
<ul>
<li>应用广泛</li>
</ul>
<p>这主要是因它解决了星型和总线型拓扑结构的不足，满足了大公司组网的实际需求。目前在一些智能化的信息大厦中的应用非常普遍。在一幢大厦中，各楼层间采用光纤作为总线传输介质，一方面可以保证网络传输距离，另一方面，光纤的传输性能要远好于同轴电缆， 所以，在传输性能上也给予了充分保证。当然投资成本会有较大增加，在一些较小建筑物中 也可以采用同轴电缆作为总线传输介质。各楼层内部仍普遍采用使用双绞线星型以太网。</p>
<ul>
<li>扩展灵活</li>
</ul>
<p>这主要是继承了星型拓扑结构的优点。但由于仍采用广播式的消息传送方式，所以在总 线长度和节点数量上也会受到限制，不过在局域网中的影响并不是很大。</p>
<ul>
<li>性能差</li>
</ul>
<p>因为其骨干网段(总线段)采用总线网络连接方式，所以各楼层和各建筑物之间的网络 互联性能较差，仍局限于最高16Mbps的速率。另外，这种结构网络具有总线型网络结构的 弱点，网络速率会随着用户的增多而下降。当然在采用光纤作为传输介质的混合型网络中， 这些影响还是比较小的。</p>
<ul>
<li>较难维护</li>
</ul>
<p>这主要受到总线型网络拓扑结构的制约，如果总线断，则整个网络也就瘫痪了，但是如果是分支网段出了故障，则不影响整个网络的正常运作。再一个就是整个网络非常复杂，维 护起来不容易。</p>
<h2 id="3-蓝牙网络拓扑"><a href="#3-蓝牙网络拓扑" class="headerlink" title="3. 蓝牙网络拓扑"></a><font size=3>3. 蓝牙网络拓扑</font></h2><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙通信模式.png" alt="蓝牙通信模式" style="zoom:8%;" />

<h3 id="3-1-蓝牙个域网"><a href="#3-1-蓝牙个域网" class="headerlink" title="3.1 蓝牙个域网"></a><font size=3>3.1 蓝牙个域网</font></h3><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/BLE蓝牙网络拓扑.png" alt="BLE蓝牙网络拓扑" style="zoom: 15%;" />

<h3 id="3-2-蓝牙Mesh网状拓扑"><a href="#3-2-蓝牙Mesh网状拓扑" class="headerlink" title="3.2 蓝牙Mesh网状拓扑"></a><font size=3>3.2 蓝牙Mesh网状拓扑</font></h3><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙Mesh网络拓扑.png" alt="蓝牙Mesh网络拓扑" style="zoom:11%;" />

<h3 id="3-3-防止广播洪泛"><a href="#3-3-防止广播洪泛" class="headerlink" title="3.3 防止广播洪泛"></a><font size=3>3.3 防止广播洪泛</font></h3><p>蓝牙Mesh通过<strong>消息队列缓存</strong>和<strong>信息寿命（TTL）</strong>字段来避免网络洪泛。TTL的值，每转发一次就会减1，减1的过程是在网络层完成的。</p>
<h1 id="二、蓝牙Mesh协议栈结构"><a href="#二、蓝牙Mesh协议栈结构" class="headerlink" title="二、蓝牙Mesh协议栈结构"></a><font size=3>二、蓝牙Mesh协议栈结构</font></h1><h2 id="1-什么是协议栈？"><a href="#1-什么是协议栈？" class="headerlink" title="1. 什么是协议栈？"></a><font size=3>1. 什么是协议栈？</font></h2><p>先来看一下C语言学习过程中的栈的概念：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/数据结构 - 栈.png" alt="数据结构 - 栈" style="zoom:28%;" />

<p>协议栈与上面的概念吧，我自己感觉有点没啥关系的感觉，还是直接百度吧：协议栈是指网络中各层协议的总和，其形象的反映了一个网络中文件传输的过程，由上层协议到底层协议，再由底层协议到上层协议。</p>
<p>协议栈就是协议的实现，可以理解为代码、函数库、供上层应用调用。商业化的协议栈就是给我们写好了底层的代码，符合协议标准，提供给我们一个功能模块调用。我们需要关心的就是我们的应用逻辑，数据从哪里到哪里，怎么存储，处理还有系统里的设备之间的通信顺序什么的。所以当我们做具体应用时，起始不需要关心协议栈是怎么写的，里面的每条代码是什么意思。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙 Mesh 协议栈调用顺序.png" alt="蓝牙 Mesh 协议栈调用顺序" style="zoom:12%;" />

<h2 id="2-蓝牙Mesh协议栈各层行为"><a href="#2-蓝牙Mesh协议栈各层行为" class="headerlink" title="2. 蓝牙Mesh协议栈各层行为"></a><font size=3>2. 蓝牙Mesh协议栈各层行为</font></h2><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙Mesh.png" alt="蓝牙Mesh" style="zoom: 31%;" />

<h1 id="三、蓝牙Mesh基本概念"><a href="#三、蓝牙Mesh基本概念" class="headerlink" title="三、蓝牙Mesh基本概念"></a><font size=3>三、蓝牙Mesh基本概念</font></h1><h2 id="1-Mesh中的角色"><a href="#1-Mesh中的角色" class="headerlink" title="1. Mesh中的角色"></a><font size=3>1. Mesh中的角色</font></h2><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙Mesh角色.png" alt="蓝牙Mesh角色" style="zoom: 37%;" />

<h2 id="2-地址的类型"><a href="#2-地址的类型" class="headerlink" title="2. 地址的类型"></a><font size=3>2. 地址的类型</font></h2><p>地址是两个字节表示：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/image-20231230145458225.png" alt="image-20231230145458225" style="zoom: 50%;" />

<h2 id="3-元素、模型与单播地址"><a href="#3-元素、模型与单播地址" class="headerlink" title="3. 元素、模型与单播地址"></a><font size=3>3. 元素、模型与单播地址</font></h2><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/元素、模型和单播地址.png" alt="元素、模型和单播地址" style="zoom:20%;" />

<h2 id="4-消息、状态、模型"><a href="#4-消息、状态、模型" class="headerlink" title="4. 消息、状态、模型"></a><font size=3>4. 消息、状态、模型</font></h2><p>每个元素模型里都会有很多状态，都是通过客户端与服务器访问进行设置或读取。模型分三类：服务端模型、客户端模型、控制模型。</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/消息、状态与设备.png" alt="消息、状态与设备" style="zoom:16%;" />

<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/三类模型.png" alt="三类模型" style="zoom:15%;" />

<h2 id="5-发布和订阅"><a href="#5-发布和订阅" class="headerlink" title="5. 发布和订阅"></a><font size=3>5. 发布和订阅</font></h2><p>节点可以向单播地址、组播地址、虚拟地址发布消息，其它节点也可以订阅某些组播地址或虚拟地址。</p>
<h2 id="6-Mesh网络安全"><a href="#6-Mesh网络安全" class="headerlink" title="6. Mesh网络安全"></a><font size=3>6. Mesh网络安全</font></h2><p>网络密钥、应用密钥、设备密钥</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/应用密钥绑定实例.png" alt="应用密钥绑定实例" style="zoom:15%;" />

<h1 id="四、蓝牙Mesh模型层介绍"><a href="#四、蓝牙Mesh模型层介绍" class="headerlink" title="四、蓝牙Mesh模型层介绍"></a><font size=3>四、蓝牙Mesh模型层介绍</font></h1><h2 id="1-配置模型"><a href="#1-配置模型" class="headerlink" title="1. 配置模型"></a><font size=3>1. 配置模型</font></h2><p>基础模型有以下几个，它们是由蓝牙联盟定义的：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙 Mesh 基础模型.png" alt="蓝牙 Mesh 基础模型" style="zoom: 20%;" />

<p>配置模型的一些状态如下：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙 Mesh 配置模型状态.png" alt="蓝牙 Mesh 配置模型状态" style="zoom:17%;" />

<p>健康模型的一些状态如下：</p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙 Mesh 健康模型状态.png" alt="蓝牙 Mesh 健康模型状态" style="zoom:21%;" />

<h2 id="2-通用模型"><a href="#2-通用模型" class="headerlink" title="2. 通用模型"></a><font size=3>2. 通用模型</font></h2><h3 id="2-1-SIG-model-ID"><a href="#2-1-SIG-model-ID" class="headerlink" title="2.1 SIG model ID"></a><font size=3>2.1 SIG model ID</font></h3><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/模型ID.png" alt="模型ID" />

<h3 id="2-2-SIG-Model-操作码"><a href="#2-2-SIG-Model-操作码" class="headerlink" title="2.2 SIG Model 操作码"></a><font size=3>2.2 SIG Model 操作码</font></h3><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/模型操作码opcode.png" alt="模型操作码opcode" />

<h2 id="3-厂商模型"><a href="#3-厂商模型" class="headerlink" title="3. 厂商模型"></a><font size=3>3. 厂商模型</font></h2><p>以阿里巴巴厂商为例，厂商ID为<strong>0x01A8</strong></p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙Mesh厂商模型 - 厂商模型ID.png" alt="蓝牙Mesh厂商模型 - 厂商模型ID" style="zoom:20%;" />

<h3 id="3-1-消息结构（读取）"><a href="#3-1-消息结构（读取）" class="headerlink" title="3.1 消息结构（读取）"></a><font size=3>3.1 消息结构（读取）</font></h3><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙Mesh厂商模型 - 消息结构（读取）.png" alt="蓝牙Mesh厂商模型 - 消息结构（读取）" style="zoom:15%;" />

<h3 id="3-2-消息结构（设置）"><a href="#3-2-消息结构（设置）" class="headerlink" title="3.2 消息结构（设置）"></a><font size=3>3.2 消息结构（设置）</font></h3><img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/蓝牙Mesh厂商模型 - 消息结构（设置）.png" alt="蓝牙Mesh厂商模型 - 消息结构（设置）" style="zoom:18%;" />

<h3 id="3-3-属性类型规范"><a href="#3-3-属性类型规范" class="headerlink" title="3.3 属性类型规范"></a><font size=3>3.3 属性类型规范</font></h3><p>官网文档说明：<a target="_blank" rel="noopener" href="https://www.aligenie.com/doc/357554/zq0un4?tbpm=1">AliGenie - IoT开放平台</a></p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/风扇产品软件规范.png" alt="风扇产品软件规范" />

<p>实测：</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">风扇风速：大一点或小一点 0xF00B 0x010A，大一点为0x01 小一点为0xFF。</span><br><span class="line">风扇方向：0x0521，正转为0x00 反转为0x01。</span><br><span class="line">风扇挡位：0x010A，一档0x01 二档0x02 ... 以此类推。</span><br></pre></td></tr></table></figure>

<h3 id="3-4-天猫精灵厂商操作码"><a href="#3-4-天猫精灵厂商操作码" class="headerlink" title="3.4 天猫精灵厂商操作码"></a><font size=3>3.4 天猫精灵厂商操作码</font></h3><p>操作码可以在这里看：<a target="_blank" rel="noopener" href="https://www.aligenie.com/doc/357554/iv5it7#uEBXu">AliGenie - IoT开放平台——三. 扩展消息</a></p>
<img data-src="https://fanhua-picture.oss-cn-hangzhou.aliyuncs.com/01%E5%B5%8C%E5%85%A5%E5%BC%8F%E5%BC%80%E5%8F%91/01HQ%E8%AF%BE%E7%A8%8B%E4%BD%93%E7%B3%BB/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/LV04-%E5%A4%A9%E7%8C%AB%E8%93%9D%E7%89%99Mesh%E9%A1%B9%E7%9B%AE-02-%E5%88%9D%E7%BA%A7%E5%BC%80%E5%8F%91-04-%E7%AE%A1-%E8%93%9D%E7%89%99Mesh%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/img/天猫精灵厂商操作码.png" alt="天猫精灵厂商操作码" />

    </div>

    
    
    

    <footer class="post-footer">




    <div>
        
            <div style="text-align:center;color: #ccc;font-size:14px;">
            ----------本文结束
            <i class="fas fa-fan fa-spin" style="color: #FF1493; font-size: 1rem"></i>
            感谢您的阅读----------
            </div>
        
    </div>





  
  <div class="my_post_copyright"> 
    <p><span>文章标题:</span><a href="/post/c222fb0c.html">LV04-天猫蓝牙Mesh项目-02-初级开发-04-管-蓝牙Mesh基础知识</a></p>
    <p><span>文章作者:</span><a href="/" title="欢迎访问 《苏木》 的学习笔记">苏木</a></p>
    <p><span>发布时间:</span>2024年01月07日 - 11:45</p>
    <p><span>最后更新:</span>2025年06月14日 - 00:25</p>
    <p><span>原始链接:</span><a href="/post/c222fb0c.html" title="LV04-天猫蓝牙Mesh项目-02-初级开发-04-管-蓝牙Mesh基础知识">https://sumumm.github.io/post/c222fb0c.html</a></p>
    <p><span>许可协议:</span><i class="fab fa-creative-commons"></i> <a rel="license" href= "https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
  </div>
  


          <div class="post-tags">
              <a href="/tags/LV21-%E5%A4%A9%E7%8C%AB%E7%B2%BE%E7%81%B5IOT/" rel="tag"><i class="fa fa-tag"></i> LV21-天猫精灵IOT</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/post/e11a5cef.html" rel="prev" title="LV04-天猫蓝牙Mesh项目-02-初级开发-05-设备入网">
                  <i class="fa fa-angle-left"></i> LV04-天猫蓝牙Mesh项目-02-初级开发-05-设备入网
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/post/2f482997.html" rel="next" title="LV04-天猫蓝牙Mesh项目-02-初级开发-03-云-天猫精灵生活平台">
                  LV04-天猫蓝牙Mesh项目-02-初级开发-03-云-天猫精灵生活平台 <i class="fa fa-angle-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="copyright">
    &copy; 2017 – 
    <span itemprop="copyrightYear">2025</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">苏木</span>
  </div>
<div class="wordcount">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
      <span>站点总字数：</span>
    <span title="站点总字数">3.7m</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span>站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">225:26</span>
  </span>
</div>




    <span id="sitetime"></span>
    <script defer language=javascript>
        function siteTime()
        {
            window.setTimeout("siteTime()", 1000);
            var seconds = 1000;
            var minutes = seconds * 60;
            var hours = minutes * 60;
            var days = hours * 24;
            var years = days * 365;
            var today = new Date();
            var todayYear = today.getFullYear();
            var todayMonth = today.getMonth()+1;
            var todayDate = today.getDate();
            var todayHour = today.getHours();
            var todayMinute = today.getMinutes();
            var todaySecond = today.getSeconds();
            /*==================================================
            Date.UTC() -- 返回date对象距世界标准时间(UTC)1970年1月1日午夜之间的毫秒数(时间戳)
            year        - 作为date对象的年份，为4位年份值
            month       - 0-11之间的整数，做为date对象的月份
            day         - 1-31之间的整数，做为date对象的天数
            hours       - 0(午夜24点)-23之间的整数，做为date对象的小时数
            minutes     - 0-59之间的整数，做为date对象的分钟数
            seconds     - 0-59之间的整数，做为date对象的秒数
            microseconds - 0-999之间的整数，做为date对象的毫秒数
            ==================================================*/
            var t1 = Date.UTC(2017, 
                              5, 
                              19, 
                              0, 
                              0, 
                              0); //北京时间
            var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond);
            var diff = t2-t1;
            var diffYears = Math.floor(diff/years);
            var diffDays = Math.floor((diff/days)-diffYears*365);
            var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours);
            var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes);
            var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds);
            document.getElementById("sitetime").innerHTML="已在这里 "+diffYears+" 年 "+diffDays+" 天 "+diffHours+" 小时 "+diffMinutes+" 分钟 "+diffSeconds+" 秒";
        }
        siteTime();
    </script>



    </div>
  </footer>

  
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/next-theme-pjax/0.6.0/pjax.min.js" integrity="sha256-vxLn1tSKWD4dqbMRyv940UYw4sXgMtYcK6reefzZrao=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/fancyapps-ui/5.0.28/fancybox/fancybox.umd.js" integrity="sha256-ytMJGN3toR+a84u7g7NuHm91VIR06Q41kMWDr2pq7Zo=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/lozad.js/1.16.0/lozad.min.js" integrity="sha256-mOFREFhqmHeQbXpK2lp4nA3qooVgACfh88fpJftLBbc=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/hexo-generator-searchdb/1.4.1/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>




  <script src="/js/third-party/fancybox.js"></script>

  <script src="/js/third-party/pace.js"></script>


  




  

  <script class="next-config" data-name="enableMath" type="application/json">true</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.js","integrity":"sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>


 
        <div id="click-show-text"
            data-mobile = false
            data-text = 富强,民主,文明,和谐,自由,平等,公正,法制,爱国,敬业,诚信,友善
            data-fontsize = 15px
            data-random= false>
        </div>
       

      
        <script async src=https://cdn.jsdelivr.net/npm/hexo-next-mouse-effect@latest/click/showText.js></script>
      

      
    




    <script async src="/js/fancybox_param.js"></script>





<!-- APlayer本体 -->



</body>
</html>
